package com.hyt.it.ogt.ykcj.service.grade.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hyt.it.ogt.ykcj.common.utils.DateUtils;
import com.hyt.it.ogt.ykcj.domain.grade.ServantExamineeSubjectGrade;
import com.hyt.it.ogt.ykcj.mapper.grade.ServantExamineeSubjectGradeMapper;
import com.hyt.it.ogt.ykcj.service.grade.IServantExamineeSubjectGradeService;

/**
 * 公务员考生科目成绩Service业务层处理
 * 
 * @author admin
 * @date 2021-09-09
 */
@Service
public class ServantExamineeSubjectGradeServiceImpl implements IServantExamineeSubjectGradeService 
{
    @Autowired
    private ServantExamineeSubjectGradeMapper servantExamineeSubjectGradeMapper;

    /**
     * 查询公务员考生科目成绩
     * 
     * @param id 公务员考生科目成绩ID
     * @return 公务员考生科目成绩
     */
    @Override
    public ServantExamineeSubjectGrade selectServantExamineeSubjectGradeById(String id)
    {
        return servantExamineeSubjectGradeMapper.selectServantExamineeSubjectGradeById(id);
    }

    /**
     * 查询公务员考生科目成绩列表
     * 
     * @param servantExamineeSubjectGrade 公务员考生科目成绩
     * @return 公务员考生科目成绩
     */
    @Override
    public List<ServantExamineeSubjectGrade> selectServantExamineeSubjectGradeList(ServantExamineeSubjectGrade servantExamineeSubjectGrade)
    {
        return servantExamineeSubjectGradeMapper.selectServantExamineeSubjectGradeList(servantExamineeSubjectGrade);
    }

    /**
     * 新增公务员考生科目成绩
     * 
     * @param servantExamineeSubjectGrade 公务员考生科目成绩
     * @return 结果
     */
    @Override
    public int insertServantExamineeSubjectGrade(ServantExamineeSubjectGrade servantExamineeSubjectGrade)
    {
        servantExamineeSubjectGrade.setCreateTime(DateUtils.getNowDate());
        return servantExamineeSubjectGradeMapper.insertServantExamineeSubjectGrade(servantExamineeSubjectGrade);
    }

    /**
     * 修改公务员考生科目成绩
     * 
     * @param servantExamineeSubjectGrade 公务员考生科目成绩
     * @return 结果
     */
    @Override
    public int updateServantExamineeSubjectGrade(ServantExamineeSubjectGrade servantExamineeSubjectGrade)
    {
        servantExamineeSubjectGrade.setUpdateTime(DateUtils.getNowDate());
        return servantExamineeSubjectGradeMapper.updateServantExamineeSubjectGrade(servantExamineeSubjectGrade);
    }

    /**
     * 批量删除公务员考生科目成绩
     * 
     * @param ids 需要删除的公务员考生科目成绩ID
     * @return 结果
     */
    @Override
    public int deleteServantExamineeSubjectGradeByIds(String[] ids)
    {
        return servantExamineeSubjectGradeMapper.deleteServantExamineeSubjectGradeByIds(ids);
    }

    /**
     * 删除公务员考生科目成绩信息
     * 
     * @param id 公务员考生科目成绩ID
     * @return 结果
     */
    @Override
    public int deleteServantExamineeSubjectGradeById(String id)
    {
        return servantExamineeSubjectGradeMapper.deleteServantExamineeSubjectGradeById(id);
    }
}
